package com.uduemc.biso.master.backend.controller;

import java.io.IOException;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;

/**
 * 用户授权模块
 * 
 * @author guanyi
 *
 */
@Controller
@RequestMapping("/backend/agent")
public class BAgentController {

	/**
	 * 代理商列表
	 * 
	 * @param modelAndView
	 * @return
	 * @throws IOException
	 * @throws JsonProcessingException
	 * @throws JsonMappingException
	 * @throws JsonParseException
	 */
	@GetMapping(value = { "/infos" })
	public ModelAndView infos(ModelAndView modelAndView)
			throws JsonParseException, JsonMappingException, JsonProcessingException, IOException {
		modelAndView.setViewName("backend/agent/infos");
		return modelAndView;
	}
	
	/**
	 * 代理商设置
	 * 
	 * @param modelAndView
	 * @return
	 * @throws IOException
	 * @throws JsonProcessingException
	 * @throws JsonMappingException
	 * @throws JsonParseException
	 */
	@GetMapping(value = { "/setup" })
	public ModelAndView setup(ModelAndView modelAndView)
			throws JsonParseException, JsonMappingException, JsonProcessingException, IOException {
		modelAndView.setViewName("backend/agent/setup");
		return modelAndView;
	}
}
